export default function (prefix) {
  prefix = prefix || ''
  return [
    ['login', '/public/login', 'POST'],
    ['getCode', '/public/getCode', 'GET'],
    ['getUserInfo', '/get_info', 'GET'],
    ['logout', '/logout', 'POST'],
    ['getUnreadCount', '/message/count', 'GET'],
    ['getMessage', '/message/init', 'GET'],
    ['getContentByMsgId', '/message/content', 'GET'],
    ['hasRead', '/message/has_read', 'POST'],
    ['restoreTrash', '/message/restore', 'POST'],
    // 自带的
    ['saveErrorLogger', '/save_error_logger', 'POST'],
    ['getTableData', '/get_table_data', 'GET'],
    ['getDragList', '/get_drag_list', 'GET'],
    ['errorReq', '/error_url', 'POST'],
    ['uploadImg', '/image/upload', 'GET'],
    ['getOrgData', '/get_org_data', 'GET'],
    ['getTreeSelectData', '/get_tree_select_data', 'GET'],
    ['getRouter', '/get_router', 'GET'],

    ['getContents', '/public/list', 'get'],
    ['deletePostById', '/admin/content/delete', 'post'],
    ['updatePostById', '/admin/content/updateId', 'post'],
    ['updatePostBatchById', '/admin/content/updatePostSettings', 'post'],
    ['getTags', '/admin/getTags', 'get'],
    ['addTag', '/admin/addTag', 'get'],
    ['removeTag', '/admin/removeTag', 'get'],
    ['updateTag', '/admin/editTag', 'get'],
    ['listUser', '/admin/users', 'get']
  ].map(function (v) {
    v[1] = prefix + v[1]
    /* if (v[0] == 'login') {
      v[4] = 'application/x-www-form-urlencoded'
    } */
    return v
  })
}
